Add EcScalar and EcPoint - #174
Conversation
b85ae41 to
ef56f85
Compare
|
@arckoor Apologies, needs another rebase now |
0c9dda0 to
f695742
Compare
|
No worries, was pretty sure it would need one either way. |
Current structure seems fine |
There was a problem hiding this comment.
Pull request overview
This PR introduces Rust wrappers for Botan 3.12’s new elliptic-curve scalar/point FFI types and integrates them into the existing EC group and key APIs, along with an integration test covering the new functionality.
Changes:
- Add
EcScalarandEcPointwrappers (construction, encoding, arithmetic helpers) behindcfg(botan_ffi_20260506). - Extend
EcGroup,Privkey, andPubkeywith new EC-focused helpers (identity/generator, EC key creation, EC group/private scalar accessors). - Add an integration test validating point/scalar conversions, multiplication/addition, and SEC1 encodings.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| botan/tests/tests.rs | Adds coverage for EcScalar/EcPoint creation, arithmetic, and encoding/decoding under botan_ffi_20260506. |
| botan/src/pubkey.rs | Adds EC key creation and new EC-only accessors to retrieve group and private scalar value. |
| botan/src/lib.rs | Wires in the new ec_point module and re-exports its public API. |
| botan/src/ec_point.rs | New module implementing EcScalar and EcPoint wrappers and basic operations/encodings. |
| botan/src/ec_group.rs | Adds internal handle helpers and exposes identity()/generator() helpers for the new point API. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@arckoor Copilot comments do seem relevant |
|
Working on it already, building vendored just takes a while sometimes c; |
... for when 3.12 comes around